package com.jwm.model;

import com.jwm.util.Arith;

public class Mem {
    /**
     * 内存总量
     */
    private double total;

    /**
     * 已用内存
     */
    private double used;

    /**
     * 剩余内存
     */
    private double free;

    public double getTotal() {
        return this.total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public double getUsed() {
        return this.used;
    }

    public void setUsed(double used) {
        this.used = used;
    }

    public double getFree() {
        return this.free;
    }

    public void setFree(double free) {
        this.free = free;
    }

    public double getUsage() {
        return Arith.mul(Arith.div(used, total, 4), 100);
    }
}
